import {createRouter ,createWebHistory ,createWebHashHistory} from 'vue-router'


export default createRouter({
    history:createWebHashHistory(process.env.BASE_URL),
    routes:[
          {
            path: "/",
            name:'root',
            redirect: "/mainPage/businessClassificationPage",
          },
          {
            path: "/mainPage",
            name: "mainPage",
            component: ()=>import('@/pages/mainPage.vue'),
            redirect:'/mainPage/businessClassificationPage',
            children:[
                {
                    path: "businessClassificationPage",
                    name: "businessClassificationPage",
                    component: () => import("@/pages/businessClassificationPage.vue"),
                  },
                  {
                    path: "discoveryPage",
                    name: "discoveryPage",
                    component: () => import("../pages/discoveryPage.vue"),
                  },
                  {
                    path: "myOrdersPage",
                    name: "myOrdersPage",
                    component: () => import("../pages/myOrdersPage.vue"),
                  },
                  {
                    path: "myInfoPage",
                    name: "myInfoPage",
                    component: () => import("../pages/myInfoPage.vue"),
                  },
            ]
          },
          {
            path:"/loginPage",
            name:"loginPage",
            component: () => import("../pages/loginPage.vue"),
          },
          {
            path:"/businessListPage",
            name:"businessListPage",
            component: () => import("../pages/businessListPage.vue"),
          },
          {
            path:"/registerPage",
            name:"registerPage",
            component: () => import("../pages/registerPage.vue"),
          },
          {
            path:"/addressListPage",
            name:"addressListPage",
            component: () => import("../pages/addressListPage.vue"),
          },
          {
            path:"/editAddressPage",
            name:"editAddressPage",
            component: () => import("../pages/editAddressPage.vue"),
          },
          {
            path:"/addAddressPage",
            name:"addAddressPage",
            component: () => import("../pages/addAddressPage.vue"),
          },
          {
            path:"/confirmOrderPage",
            name:"confirmOrderPage",
            component: () => import("../pages/confirmOrderPage.vue"),
          },
          {
            path:"/myPointsPage",
            name:"myPointsPage",
            component: () => import("../pages/myPointsPage.vue"),
          },
          {
            path:"/businessInfoPage",
            name:"businessInfoPage",
            component: () => import("../pages/businessInfoPage.vue"),
          },
          {
            path:"/paymentPage",
            name:"paymentPage",
            component: () => import("../pages/paymentPage.vue"),
          },
        

    ]
});